projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2031bcd
)
Trigger fontconfig initialization early
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 19 Aug 2020 18:20:41 +0000
(14:20 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 20 Aug 2020 02:12:00 +0000
(22:12 -0400)
Add a pango call to create the fontmap already in gtk_init.
This will let us hide the cost of FcInit() (which on font-heavy
systems can be ~100ms) in a thread, on the pango side.
gtk/gtkmain.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmain.c
b/gtk/gtkmain.c
index f59f1403cc1c9bdce55e99aa7900f8ab5eb2973c..a517a0e6e7e21aa4ed754d0e795482292e224372 100644
(file)
--- a/
gtk/gtkmain.c
+++ b/
gtk/gtkmain.c
@@
-623,6
+623,9
@@
do_pre_parse_initialization (void)
slowdown = g_ascii_strtod (env_string, NULL);
_gtk_set_slowdown (slowdown);
}
+
+ /* Trigger fontconfig initialization early */
+ pango_cairo_font_map_get_default ();
}
static void